import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

/**
 * All rights Reserved, Designed By www.super-master.cn
 *
 * @ProjectName: rock-paper-scissors
 * @Package: PACKAGE_NAME
 * @ClassName: file_read
 * @Description: []
 * <p> </p>
 * @Author: [chen]
 * @Date: 2022/4/26 10:54
 * @Version: V1.0
 **/

public class file_read {
    public static void File_read() throws FileNotFoundException {
        String fileName = "d:\\result.txt";

        try (Scanner sc = new Scanner(new FileReader(fileName))) {
            while (sc.hasNextLine()) {  //按行读取字符串
                String line = sc.nextLine();
                System.out.println(line);
            }
        }
    }


}
